<?php $userName = isset($userName) ? $userName : Yii::app()->user->getState('login');

if(!isset($curent)) {$curent='';}

?>


<ul id="tabs">
  <li class="first <?php if($curent=='profile') echo ('activ_tab');  ?>">
   <a class="<?php if($curent=='reviews') echo ('befor_activ_tab');  ?>" href="<?php echo Yii::app()->createUrl('user/profile/profile', array('login'=>$userName)); ?>" >Профиль</a>
  </li>
  <li class="<?php if($curent=='reviews') echo ('activ_tab');  ?>"> 
         <a class="<?php if($curent=='comments') echo ('befor_activ_tab');  ?>" href="<?php echo Yii::app()->createUrl('user/profile/reviews', array('login'=>$userName)); ?>">Отзывы</a>
  </li>  
  <li class="<?php if($curent=='comments') echo ('activ_tab');  ?>">
      <?php if(!empty($countNewComments)) : ?>
        <span style="position: absolute; background-color: red;">
            <a href="<?php echo Yii::app()->createUrl('user/profile/newRevComm', array('login'=>$userName)); ?>"><?php echo $countNewComments; ?></a>
        </span>
      <?php endif; ?>
      <a class="<?php if($curent=='forum') echo ('befor_activ_tab');  ?>" href="<?php echo Yii::app()->createUrl('user/profile/comments', array('login'=>$userName)); ?>">Комментарии</a>
  </li>
  <li class="<?php if($curent=='forum') echo ('activ_tab');  ?>"> 
  <a class="<?php if($curent=='messages') echo ('befor_activ_tab');  ?> <?php if(Yii::app()->user->isGuest || $userName != Yii::app()->user->getState('login')) echo('last'); ?>"  href="<?php echo Yii::app()->createUrl('user/profile/posts', array('login'=>$userName)); ?>" >Сообщения на мини-форумах</a>
  </li>
  
  
  
  <?php if(!Yii::app()->user->isGuest && $userName == Yii::app()->user->getState('login')) : ?>
  <li  class="<?php if($curent=='messages') echo ('activ_tab');  ?>"> 
        
     <a class="last" href="<?php echo Yii::app()->createUrl('user/messages/messages'); ?>">Личные сообщения</a> 
      <?php if(!empty($countNewMessages)) :?>
              <span class="profil_new_messages">
                 <?php echo $countNewMessages; ?>
             </span> 
         <?php endif; ?>
  </li>
  <?php endif; ?>  
   
</ul>
<div class="tabs_wraper">
</div>

